<template>
  <div class="push-message">
    <step :step-number="stepNumber"/>
    <basic v-if="stepNumber === 0" @goNext="goNext"/>
    <class v-if="stepNumber === 1" :statusId="statusId" @classBack="stepNumber--" @classNext="stepNumber++"/>
    <detail v-if="stepNumber === 2" @back="backOperate"/>
  </div>
</template>

<script>
  import Step from './pushmessage/step'
  import Basic from './pushmessage/basic'
  import Detail from './pushmessage/packagedetail'
  import Class from './pushmessage/classdetail'

  export default {
    components: {
      Step,
      Basic,
      Detail,
      Class
    },
    data() {
      return {
        stepNumber: 0,
        statusId: "",
        routerId: ""
      }
    },
    created() {
      this.routerId = this.$route.params.ID
    },
    methods: {
      backOperate() {
        this.stepNumber--
      },
      goNext(id) {
        console.log(this.stepNumber);
        this.stepNumber++;
        this.statusId = id;
        console.log(this.statusId+'goNext')
      }
    }
  }
</script>

<style lang="scss" scoped>
</style>
